Skip to main content

User Balance

Queries the balance of the specified user address on the specified chain.

query Vcoin($user: CrossChainUserInput) {
vcoin {
user_balance(user: $user) {
balances {
amount
token_id
}
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://testnet.api.euclidprotocol.com/graphql' \
--data '{"query":"query Vcoin($user: CrossChainUserInput) {\n vcoin {\n user_balance(user: $user) {\n balances {\n amount\n token_id\n }\n }\n }\n}","variables":{"user":{"address":"nibi1...","chain_uid":"nibiru"}}}'

Open in Playground

  • user (CrossChainUserInput): The input specifying the user for the balance query by specifying the user address and chain UID.

Return Fields

FieldTypeDescription
amountStringThe amount of tokens in the user's balance.
token_idStringThe identifier of the token.